import Vue from 'vue'
import Router from 'vue-router'
import Login from "../components/Login";

import Main from "../components/Main";
import Register from "../components/Register";
import Index from "../components/Index";
import Xq from "../components/Xq";
// import Particulars from "../components/Particulars";



Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            redirect:'/shouye'
        },
        {
            path: '/login',
            name: 'login',
            component: Login,
            meta:{
                title:'登录'
            }
        },
        {
            path: '/index',
            name: 'index',
            component: Index
        },
        {
            path: '/xq',
            name: 'xq',
            component: Xq,
            meta:{
                title:'商品详情'
            }
        },
        {
            path: '/register',
            name: 'Register',
            component: Register,
            meta:{
                title:'注册'
            }
        },
        {
            path: '/main',
            name: 'main',
            component: Main,
            //子路由：在父路由内部的视图中显示
        },
        // {
        //     path: '/particulars',
        //     name: 'particulars',
        //     component: Particulars,
        // },
        {
            path: '/shouye',
            name: 'shouye',
            component:()=>import('../components/Shouye') ,
            meta:{
                title:'18年 不负每一份热爱'
            }
        },
        {
            path: '/product',
            name: 'product',
            component:()=>import('../components/Product') ,
            meta:{
                title:'商品展示'
            }
        },
        {
            path: '/activity',
            name: 'activity',
            component:()=>import('../components/Activity') ,
            children:[

            ],
            meta:{
                title:'专享活动'
            }
        },
        {
            path: '/activityContent',
            name: 'activityContent',
            component:()=>import('../components/ActivityContent') ,
            meta:{
                title:'专享活动列表'
            }
        },

        {
            path: '/activityContentOne',
            name: 'activityContentOne',
            component:()=>import('../components/ActivityContentOne') ,
            meta:{
                title:'专享活动列表'
            }
        },
        {
            path: '/shoppingCart',
            name: 'shoppingCart',
            component:()=>import('../components/ShoppingCart') ,
            meta:{
                title:'购物车'
            }
        },
        {
            path: '/personalCenter',
            name: 'personalCenter',
            component:()=>import('../components/PersonalCenter') ,
            meta:{
                title:'个人中心'
            }
        },
        {
            path: '/orderDetails',
            name: 'orderDetails',
            component:()=>import('../components/OrderDetails') ,
            meta:{
                title:'订单详情'
            }
        },
        {
            path: '/activityorderDetails',
            name: 'activityorderDetails',
            component:()=>import('../components/ActivityOrderDetails') ,
            meta:{
                title:'活动订单详情'
            }
        },
    ],
    mode:'history'
})
